PopupWidgetScreen
A base screen that supports popup widgets. See PopupParentElement for documentation on underlying implementations.
To add and remove popups from this screen, call PopupWidget.push and PopupWidget.pop
For most intents and purposes, treat this screen like a standard Screen, with a couple caveats:
Make sure to call super on resize, render, and keyPressed otherwise popup functionality will break
call super.render AFTER any custom rendering, or popups may appear improperly below custom elements
call super.keyPressed BEFORE custom key presses, otherwise clicks may improperly propagate through popups to elements underneath them
Author
fzzyhmstrs
Since
0.2.0, made render final and added renderContents 0.6.0
Parameters
Text, the screen title
See also
Properties
Boolean prevents mouseReleased
from triggering on the Popup or Widget underneath the active popup if it's closed on mouseClicked
getter and setter for the cached element.
A stack for holding popupwidgets while allowing for easy list iteration as needed. For rendering this stack should be traversed in reverse order, which LinkedList makes easy with descendingIterator
Functions
Render call that should be used to render the main contents of a subclass. This is used instead of overriding render for proper positioning of the popup stack.
When called the parent element should reselect a hovered element based on the supplied mouse positions, if it tracks such things
Applies a popup widget to this parent. If null is passed, removes the top (newest) popup instead